import React, { useState } from 'react'
import { Modal } from 'antd';
export default  function Add(props) {   
    console.log("props",props);
    const {addSetIsModalVisible}=props
    const [isModalVisible, setIsModalVisible] = useState(true);
    const handleOk = () => {
        setIsModalVisible(false);
        let params={
            a:'1'
        }
        addSetIsModalVisible(params)
      };
    
      const handleCancel = () => {
        setIsModalVisible(false);
      };
    return (
    
        <div>
             <Modal visible={isModalVisible}  title="Basic Modal" onOk={handleOk} onCancel={handleCancel}  okText="确认"
        cancelText="取消">
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
      </Modal>
        </div>
    )
}